// maindlg.h : interface of the CMainDlg class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINDLG_H__EF507D5B_65FE_4111_8540_D302B467D56A__INCLUDED_)
#define AFX_MAINDLG_H__EF507D5B_65FE_4111_8540_D302B467D56A__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

// class CMyListViewCtrl : public CWindowImpl<CMyListViewCtrl, CListViewCtrl>
// {
// public:
// 	BEGIN_MSG_MAP(CMyListViewCtrl)
// 	END_MSG_MAP()
// };

class CMainDlg : public CDialogImpl<CMainDlg>, public CUpdateUI<CMainDlg>,
	public CMessageFilter, public CIdleHandler, public CWinDataExchange<CMainDlg>
{
public:
	enum { IDD = IDD_MAINDLG };

	BEGIN_UPDATE_UI_MAP(CMainDlg)
	END_UPDATE_UI_MAP()

	BEGIN_MSG_MAP(CMainDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout)
		COMMAND_ID_HANDLER(IDOK, OnOK)
		COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
		NOTIFY_HANDLER(IDC_LIST1, NM_DBLCLK, OnDBClick)
// 		NOTIFY_HANDLER(IDC_LIST1, HDN_ITEMCLICK, OnItemClick) 
		COMMAND_HANDLER(IDC_BUTTON1, BN_CLICKED, OnClickedButton1)
		COMMAND_HANDLER(IDC_BUTTON2, BN_CLICKED, OnClickedButton2)
		COMMAND_HANDLER(IDC_BUTTON3, BN_CLICKED, OnClickedButton3)
	END_MSG_MAP()

// Handler prototypes (uncomment arguments if needed):
//	LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
//	LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
//	LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnAppAbout(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnDBClick(WORD wNotifyCode, NMHDR* pNMHDR, int bhandled);
// 	LRESULT OnItemClick(WORD wNotifyCode, NMHDR* pNMHDR, int bhandled);
	

	virtual BOOL PreTranslateMessage(MSG *pMsg);
	virtual BOOL OnIdle();

private:
	CListViewCtrl m_ListViewCtrl;
	LRESULT OnClickedButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINDLG_H__EF507D5B_65FE_4111_8540_D302B467D56A__INCLUDED_)
